package com.ganzalang.gmall.rocketmq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @description: 订单消息消费者
 * @author: Ganzalang
 * @Date 2021/5/8 11:48
 */
@Component
@RocketMQMessageListener(topic = "Topic1", consumerGroup = "consumer-demo1")
@Slf4j
public class OrderConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        log.info("收到消息：{}", s);
    }
}
